package org.example.judge_contest.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.example.judge_common.entity.PageResult;
import org.example.judge_contest.request.RequestContestAnnounceParams;
import org.example.judge_contest.request.RequestRegisterParams;
import org.example.judge_pojo.ContestRegister;

import java.util.List;

public interface ContestRegisterService extends IService<ContestRegister> {
    ContestRegister getByUserIdAndContestId(String userId, String contestId);

    List<ContestRegister> list(String contestId);

    /**
     * 获取比赛的报名人数
     * @param countId
     * @return
     */
    Integer getCountByContest(String countId);

    boolean delete(String contestId, String userId);

    PageResult<ContestRegister> search(RequestRegisterParams params);

    //报名的比赛场次
    Integer getContestCount(String userId);
}
